<!doctype html>



  


<html class="theme-next mist use-motion">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>



<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />












  <link href="/vendors/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css"/>




  <link href="//fonts.googleapis.com/css?family=Lato:300,400,700,400italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">



<link href="/vendors/font-awesome/css/font-awesome.min.css?v=4.4.0" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=0.5.0" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="读书,电竞," />








  <link rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico?v=0.5.0" />






<meta name="description" content="先来首歌怀念一下


0%细想应该是高三接触到这本书，偶然翻到跃峰买的一本电子杂志，sky在杂志里开了一篇专栏，连载的是他的一本自传『当李晓峰成为Sky』，那一刊记载的正是sky从郑州回家，再次上路后彻底转型为魔兽玩家的那段时光，光阴如梭，白云苍狗，没想到三四年过去了我一直念念不忘，很久之前就已经入手了电子版，只是重度拖延症一直延期到Kindle到手的第二天，利用一节科技英语课，开始看这本执念了三">
<meta property="og:type" content="article">
<meta property="og:title" content="『当李晓峰成为Sky』">
<meta property="og:url" content="http://lijundong.com/2015/11/20/『当李晓峰成为Sky』/index.html">
<meta property="og:site_name" content="Leeon's BLOG">
<meta property="og:description" content="先来首歌怀念一下


0%细想应该是高三接触到这本书，偶然翻到跃峰买的一本电子杂志，sky在杂志里开了一篇专栏，连载的是他的一本自传『当李晓峰成为Sky』，那一刊记载的正是sky从郑州回家，再次上路后彻底转型为魔兽玩家的那段时光，光阴如梭，白云苍狗，没想到三四年过去了我一直念念不忘，很久之前就已经入手了电子版，只是重度拖延症一直延期到Kindle到手的第二天，利用一节科技英语课，开始看这本执念了三">
<meta property="og:image" content="http://7xlkdt.com1.z0.glb.clouddn.com/15-12-22/38260166.jpg">
<meta property="og:updated_time" content="2016-06-07T14:03:09.588Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="『当李晓峰成为Sky』">
<meta name="twitter:description" content="先来首歌怀念一下


0%细想应该是高三接触到这本书，偶然翻到跃峰买的一本电子杂志，sky在杂志里开了一篇专栏，连载的是他的一本自传『当李晓峰成为Sky』，那一刊记载的正是sky从郑州回家，再次上路后彻底转型为魔兽玩家的那段时光，光阴如梭，白云苍狗，没想到三四年过去了我一直念念不忘，很久之前就已经入手了电子版，只是重度拖延症一直延期到Kindle到手的第二天，利用一节科技英语课，开始看这本执念了三">
<meta name="twitter:image" content="http://7xlkdt.com1.z0.glb.clouddn.com/15-12-22/38260166.jpg">



<script type="text/javascript" id="hexo.configuration">
  var NexT = window.NexT || {};
  var CONFIG = {
    scheme: 'Mist',
    sidebar: {"position":"left","display":"hide"},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: 0,
      author: 'Author'
    }
  };
</script>

  <title> 『当李晓峰成为Sky』 | Leeon's BLOG </title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="en">

  



  <script type="text/javascript">
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "//hm.baidu.com/hm.js?c6907c4f3552baba34e8ee2c5980996d";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>








  
  
    
  

  <div class="container one-collumn sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-meta ">
  

  <div class="custom-logo-site-title">
    <a href="/"  class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <span class="site-title">Leeon's BLOG</span>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>
  <p class="site-subtitle"></p>
</div>

<div class="site-nav-toggle">
  <button>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
  </button>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-home fa-fw"></i> <br />
            
            Home
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories" rel="section">
            
              <i class="menu-item-icon fa fa-th fa-fw"></i> <br />
            
            Categories
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about" rel="section">
            
              <i class="menu-item-icon fa fa-user fa-fw"></i> <br />
            
            About
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives" rel="section">
            
              <i class="menu-item-icon fa fa-archive fa-fw"></i> <br />
            
            Archives
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
              <i class="menu-item-icon fa fa-tags fa-fw"></i> <br />
            
            Tags
          </a>
        </li>
      

      
    </ul>
  

  
</nav>

 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  
  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                『当李晓峰成为Sky』
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            <span class="post-meta-item-icon">
              <i class="fa fa-calendar-o"></i>
            </span>
            <span class="post-meta-item-text">Posted on</span>
            <time itemprop="dateCreated" datetime="2015-11-20T18:00:03+08:00" content="2015-11-20">
              2015-11-20
            </time>
          </span>

          
            <span class="post-category" >
              &nbsp; | &nbsp;
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">In</span>
              
                <span itemprop="about" itemscope itemtype="https://schema.org/Thing">
                  <a href="/categories/生活/" itemprop="url" rel="index">
                    <span itemprop="name">生活</span>
                  </a>
                </span>

                
                

              
            </span>
          

          
            
              <span class="post-comments-count">
                &nbsp; | &nbsp;
                <a href="/2015/11/20/『当李晓峰成为Sky』/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count ds-thread-count" data-thread-key="2015/11/20/『当李晓峰成为Sky』/" itemprop="commentsCount"></span>
                </a>
              </span>
            

          

          

          
          
             <span id="/2015/11/20/『当李晓峰成为Sky』/" class="leancloud_visitors" data-flag-title="『当李晓峰成为Sky』">
               &nbsp; | &nbsp;
               <span class="post-meta-item-icon">
                 <i class="fa fa-eye"></i>
               </span>
               <span class="post-meta-item-text">visitors </span>
               <span class="leancloud-visitors-count"></span>
              </span>
          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      
        <div class="post-gallery" itemscope itemtype="http://schema.org/ImageGallery">
          
          
            <div class="post-gallery-row">
              <a class="post-gallery-img fancybox"
                 href="http://7xlkdt.com1.z0.glb.clouddn.com/15-12-22/38260166.jpg" rel="gallery_cir4tcfcl001gqwk98o38nz02"
                 itemscope itemtype="http://schema.org/ImageObject" itemprop="url">
                <img src="http://7xlkdt.com1.z0.glb.clouddn.com/15-12-22/38260166.jpg" itemprop="contentUrl"/>
              </a>
            
          

          
          </div>
        </div>
      

      
        <p>先来首歌怀念一下</p>
<iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width="420" height="86" src="http://music.163.com/outchain/player?type=2&id=4017240&auto=0&height=66"></iframe>

<h3 id="0"><a href="#0" class="headerlink" title="0%"></a>0%</h3><p>细想应该是高三接触到这本书，偶然翻到跃峰买的一本电子杂志，sky在杂志里开了一篇专栏，连载的是他的一本自传『当李晓峰成为Sky』，那一刊记载的正是sky从郑州回家，再次上路后彻底转型为魔兽玩家的那段时光，光阴如梭，白云苍狗，没想到三四年过去了我一直念念不忘，很久之前就已经入手了电子版，只是重度拖延症一直延期到Kindle到手的第二天，利用一节科技英语课，开始看这本执念了三四年的书。<br><a id="more"></a></p>
<h3 id="25"><a href="#25" class="headerlink" title="25%"></a>25%</h3><p>初始看到了“深蓝网吧”，陌生又熟悉，印象里没有去过这家网吧，直觉告诉我这就是杂志里连载文章提到的那家网吧，意味着我已经看到了当年那篇文章提到的那一段时间，这种现实与过去重叠的错觉感，像是一把钥匙，打开了记忆的那扇门，门内星星点点的片段鱼贯而出，从我眼前划过，一幕幕幻灯片以流星雨的姿态转瞬即逝，让还未缓过神来的我徒有唏嘘。第一时间给跃峰留言，只是不知道他是否还能记起。</p>
<h3 id="50"><a href="#50" class="headerlink" title="50%"></a>50%</h3><p>这本书看到这里已经看了一半了，我既不玩星际也不玩魔兽，我有大侠梦，所以我崇拜大侠，即便他的江湖于我无关。我很喜欢这本书，因为我看到了那一份不屈，那一份执着，还看到了一个人，那段夜夜通宵练技能，每天水蒸包果腹的时光让我自惭形秽，我开始反思，我可以为了我的梦想付出多少，我迫不及待的记下此时此刻我的想法。</p>
<h3 id="70"><a href="#70" class="headerlink" title="70%"></a>70%</h3><p>后半段，sky开始走上传奇之路，然而我知道，那一件件荣耀，一座座奖杯都是长年累月的熬夜练习换来的，书已经看了70%，想的事情也多了起来，最近的一门考试在两周后，转眼大三的上半学期已经过去了一大半了，做的事情并没有多少，现实也没有改变多少，我的计划依旧只是计划，也许生活的太轻松，在sky之前很多高手选择退役，一方面肯定有放弃坚持的因素，另一个很重要的原因我相信是他们有退路，而sky的人生别无选择，如果在电竞上做不到登峰造极，后退的机会可能都没有，连个骨科医生都做不了，像是一头被逼到死角的困兽，除了置之死地而后生，殊死搏斗一番尝试翻盘，留给他的只能是灭亡，所以他奋不顾身，忘掉一切，将生活投入到了电竞，就像疯狂的程序员里面的绝影！ </p>
<h3 id="80"><a href="#80" class="headerlink" title="80%"></a>80%</h3><p>整本书花了近60%的篇幅描述未成名之前的生活经历，整日的训练，还未成为职业之前，因为父母不支持，需要四下打比赛赚生活费，然而对拮据的生活并没有很大程度的改善，多数时间都是朋友资助过来，那段时光之前也有描述，每天十个水煎包，夜夜通宵，这样的日子坚持三四年之久，SKy自己也坦言，倘若时光倒流，他不确定他能否坚持下来，其实年轻时的自己，并没有坚持一说，只是想极力的努力的想去证明自己，那些对于未来的YY成了我们最大的精神食粮，我们忘掉了身边的一切，心里只有一个声音练习！练习！！再练习！！！我们很累，但是我们更渴望看到梦想的一步步逼近，所以我们放弃休息，继续练习。</p>
<p>年轻的时候，你愿意为了喜欢的女孩子，花上一中午的时间爬遍整个村的树寻蝉壳，只因为她无意间说了句喜欢；<br>年轻的时候，你为了在校运会篮球赛上精彩的表现一把，没日没夜的练习球技，即便你从未接触过篮球，即便你一时兴起；<br>年轻的时候，你因为脑子里一闪而过的YY，浪子回头，幡然悔悟，决定对自己狠一把，即便那个画面只是一时YY，乐此不疲！</p>
<blockquote>
<p>年轻真好<br>年轻时那么鲁莽<br>年轻相信一切可以努力的梦想<br>年轻甚至相信那些努力不了的梦想<br>年轻真好<br>年轻时那么倔强<br>我们一路向北，誓不回头<br>我们执拗着梦想，执拗着坚信<br>我们努力着，尽最大的努力去达到我们的目标<br>我们坚持着，日复一日，年复一年<br>我们把最好的青春，拿去赌，赌未来，赌自己想要的一片天<br>读到此处，你的脑海出现的那幅画面是如此熟悉，却又如此遥远<br>我们再也回不去，回不去那时，一切都有希望的青春<br>已经忘了上次幻想未来的时间是何时<br>对于生活，似乎忙的少有了期待<br>对于人生，也就这样吧<br>然后提笔写下，年轻真好。</p>
</blockquote>
<h3 id="100"><a href="#100" class="headerlink" title="100%"></a>100%</h3><p>今天把『当李晓峰成为Sky』看完了，像是陪着一个朋友走了好久，历经了所有的荣耀与苦难，终于要分别了，结局像是彼此告别，他说他会一直坚持下去，一直努力下去，互相道声珍重，江湖再见！</p>
<p>值得一提的是看这本书的同时，我脑海里不断显现出绝影的身影，『疯狂的程序员』的作者，这本书算是他的自传，一个疯狂的人，成就了一段传说，让我们这些后来的学弟时常瞻仰，只是疯狂到几近癫狂的状态时，辉煌戛然而止，让人唏嘘不已。</p>

      
    </div>

    <div>
      
        
      
    </div>

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/读书/" rel="tag">#读书</a>
          
            <a href="/tags/电竞/" rel="tag">#电竞</a>
          
        </div>
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2015/11/08/科学上网/" rel="next" title="科学上网">
                <i class="fa fa-chevron-left"></i> 科学上网
              </a>
            
          </div>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2016/01/11/Chrome扩展「一」简易时钟/" rel="prev" title="Chrome扩展[一]:简易时钟">
                Chrome扩展[一]:简易时钟 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          
  <div class="comments" id="comments">
    
      <div class="ds-thread" data-thread-key="2015/11/20/『当李晓峰成为Sky』/"
           data-title="『当李晓峰成为Sky』" data-url="http://lijundong.com/2015/11/20/『当李晓峰成为Sky』/">
      </div>
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            Table of Contents
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            Overview
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel ">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="http://7xlkdt.com1.z0.glb.clouddn.com/16-3-18/59657432.jpg"
               alt="Leeon" />
          <p class="site-author-name" itemprop="name">Leeon</p>
          <p class="site-description motion-element" itemprop="description">笔记来的</p>
        </div>
        <nav class="site-state motion-element">
          <div class="site-state-item site-state-posts">
            <a href="/archives">
              <span class="site-state-item-count">32</span>
              <span class="site-state-item-name">posts</span>
            </a>
          </div>

          
            <div class="site-state-item site-state-categories">
              <a href="/categories">
                <span class="site-state-item-count">6</span>
                <span class="site-state-item-name">categories</span>
              </a>
            </div>
          

          
            <div class="site-state-item site-state-tags">
              <a href="/tags">
                <span class="site-state-item-count">54</span>
                <span class="site-state-item-name">tags</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="https://github.com/lijundong" target="_blank">
                  
                    <i class="fa fa-github-square"></i> GitHub
                  
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="https://plus.google.com/u/0/105476317091375278758" target="_blank">
                  
                    <i class="fa fa-google-plus-square"></i> Google+
                  
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="https://twitter.com/Jundong_Li" target="_blank">
                  
                    <i class="fa fa-twitter"></i> Twitter
                  
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="https://www.facebook.com/coderleon?ref=bookmarks" target="_blank">
                  
                    <i class="fa fa-facebook-square"></i> facebook
                  
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="http://www.douban.com/people/103163980/" target="_blank">
                  
                    <i class="fa fa-spinner"></i> 豆
                  
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="https://www.zhihu.com/people/leon-lee-42" target="_blank">
                  
                    <i class="fa fa-spinner"></i> 知
                  
                </a>
              </span>
            
          
        </div>

        
        

        
        <div class="links-of-blogroll motion-element">
          
        </div>

      </section>

      
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc-indicator-top post-toc-indicator">
            <i class="fa fa-angle-double-up"></i>
          </div>
          <div class="post-toc">
            
              
            
            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#0"><span class="nav-text">0%</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#25"><span class="nav-text">25%</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#50"><span class="nav-text">50%</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#70"><span class="nav-text">70%</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#80"><span class="nav-text">80%</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#100"><span class="nav-text">100%</span></a></li></ol></div>
            
          </div>
          <div class="post-toc-indicator-bottom post-toc-indicator">
            <i class="fa fa-angle-double-down"></i>
          </div>
        </section>
      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy;  2015 - 
  <span itemprop="copyrightYear">2016</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Leeon</span>
</div>

<div class="powered-by">
  Powered by <a class="theme-link" href="http://hexo.io" rel="external nofollow">Hexo</a>
</div>

<div class="theme-info">
  Theme -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next" rel="external nofollow">
    NexT.Mist
  </a>
</div>



      </div>
    </footer>

    <div class="back-to-top">
      <i class="fa fa-arrow-up"></i>
    </div>
  </div>

  


  




<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>


  <script type="text/javascript" src="/vendors/jquery/index.js?v=2.1.3"></script>

  <script type="text/javascript" src="/vendors/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  <script type="text/javascript" src="/vendors/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  <script type="text/javascript" src="/vendors/velocity/velocity.min.js"></script>

  <script type="text/javascript" src="/vendors/velocity/velocity.ui.min.js"></script>

  <script type="text/javascript" src="/vendors/fancybox/source/jquery.fancybox.pack.js"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=0.5.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=0.5.0"></script>



  
  

  
  
<script type="text/javascript" src="/js/src/scrollspy.js?v=0.5.0"></script>

<script type="text/javascript" id="sidebar.toc.highlight">
  $(document).ready(function () {
    var tocSelector = '.post-toc';
    var $tocSelector = $(tocSelector);
    var activeCurrentSelector = '.active-current';

    $tocSelector
      .on('activate.bs.scrollspy', function () {
        var $currentActiveElement = $(tocSelector + ' .active').last();

        removeCurrentActiveClass();
        $currentActiveElement.addClass('active-current');

        $tocSelector[0].scrollTop = $currentActiveElement.position().top;
      })
      .on('clear.bs.scrollspy', function () {
        removeCurrentActiveClass();
      });

    function removeCurrentActiveClass () {
      $(tocSelector + ' ' + activeCurrentSelector)
        .removeClass(activeCurrentSelector.substring(1));
    }

    function processTOC () {
      getTOCMaxHeight();
      toggleTOCOverflowIndicators();
    }

    function getTOCMaxHeight () {
      var height = $('.sidebar').height() -
                   $tocSelector.position().top -
                   $('.post-toc-indicator-bottom').height();

      $tocSelector.css('height', height);

      return height;
    }

    function toggleTOCOverflowIndicators () {
      tocOverflowIndicator(
        '.post-toc-indicator-top',
        $tocSelector.scrollTop() > 0 ? 'show' : 'hide'
      );

      tocOverflowIndicator(
        '.post-toc-indicator-bottom',
        $tocSelector.scrollTop() >= $tocSelector.find('ol').height() - $tocSelector.height() ? 'hide' : 'show'
      )
    }

    $(document).on('sidebar.motion.complete', function () {
      processTOC();
    });

    $('body').scrollspy({ target: tocSelector });
    $(window).on('resize', function () {
      if ( $('.sidebar').hasClass('sidebar-active') ) {
        processTOC();
      }
    });

    onScroll($tocSelector);

    function onScroll (element) {
      element.on('mousewheel DOMMouseScroll', function (event) {
          var oe = event.originalEvent;
          var delta = oe.wheelDelta || -oe.detail;

          this.scrollTop += ( delta < 0 ? 1 : -1 ) * 30;
          event.preventDefault();

          toggleTOCOverflowIndicators();
      });
    }

    function tocOverflowIndicator (indicator, action) {
      var $indicator = $(indicator);
      var opacity = action === 'show' ? 1 : 0;
      $indicator.velocity ?
        $indicator.velocity('stop').velocity({
          opacity: opacity
        }, { duration: 100 }) :
        $indicator.stop().animate({
          opacity: opacity
        }, 100);
    }

  });
</script>

<script type="text/javascript" id="sidebar.nav">
  $(document).ready(function () {
    var html = $('html');
    var TAB_ANIMATE_DURATION = 200;
    var hasVelocity = $.isFunction(html.velocity);

    $('.sidebar-nav li').on('click', function () {
      var item = $(this);
      var activeTabClassName = 'sidebar-nav-active';
      var activePanelClassName = 'sidebar-panel-active';
      if (item.hasClass(activeTabClassName)) {
        return;
      }

      var currentTarget = $('.' + activePanelClassName);
      var target = $('.' + item.data('target'));

      hasVelocity ?
        currentTarget.velocity('transition.slideUpOut', TAB_ANIMATE_DURATION, function () {
          target
            .velocity('stop')
            .velocity('transition.slideDownIn', TAB_ANIMATE_DURATION)
            .addClass(activePanelClassName);
        }) :
        currentTarget.animate({ opacity: 0 }, TAB_ANIMATE_DURATION, function () {
          currentTarget.hide();
          target
            .stop()
            .css({'opacity': 0, 'display': 'block'})
            .animate({ opacity: 1 }, TAB_ANIMATE_DURATION, function () {
              currentTarget.removeClass(activePanelClassName);
              target.addClass(activePanelClassName);
            });
        });

      item.siblings().removeClass(activeTabClassName);
      item.addClass(activeTabClassName);
    });

    $('.post-toc a').on('click', function (e) {
      e.preventDefault();
      var targetSelector = NexT.utils.escapeSelector(this.getAttribute('href'));
      var offset = $(targetSelector).offset().top;
      hasVelocity ?
        html.velocity('stop').velocity('scroll', {
          offset: offset  + 'px',
          mobileHA: false
        }) :
        $('html, body').stop().animate({
          scrollTop: offset
        }, 500);
    });

    // Expand sidebar on post detail page by default, when post has a toc.
    NexT.motion.middleWares.sidebar = function () {
      var $tocContent = $('.post-toc-content');

      if (CONFIG.sidebar.display === 'post' || CONFIG.sidebar.display === 'always') {
        if ($tocContent.length > 0 && $tocContent.html().trim().length > 0) {
          NexT.utils.displaySidebar();
        }
      }
    };
  });
</script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=0.5.0"></script>



  

  
    
  

  <script type="text/javascript">
    var duoshuoQuery = {short_name:"coderleon"};
    (function() {
      var ds = document.createElement('script');
      ds.type = 'text/javascript';ds.async = true;
      ds.id = 'duoshuo-script';
      ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
      ds.charset = 'UTF-8';
      (document.getElementsByTagName('head')[0]
      || document.getElementsByTagName('body')[0]).appendChild(ds);
    })();
  </script>

  
    
  





  
  
  
  <script type="text/x-mathjax-config">
    MathJax.Hub.Config({
      tex2jax: {
        inlineMath: [ ['$','$'], ["\\(","\\)"]  ],
        processEscapes: true,
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
      }
    });
  </script>

  <script type="text/x-mathjax-config">
    MathJax.Hub.Queue(function() {
      var all = MathJax.Hub.getAllJax(), i;
      for (i=0; i < all.length; i += 1) {
        all[i].SourceElement().parentNode.className += ' has-jax';
      }
    });
  </script>

  
    <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
  


  

  
  <script src="https://cdn1.lncld.net/static/js/av-core-mini-0.6.1.js"></script>
  <script>AV.initialize("pJdYd3bVkuCMKiGlqFilwfbY-gzGzoHsz", "5HFxgKVCT5jJDtW3gHibs0Tn");</script>
  <script>
    function showTime(Counter) {
      var query = new AV.Query(Counter);
      var entries = [];
      var $visitors = $(".leancloud_visitors");

      $visitors.each(function () {
        entries.push( $(this).attr("id").trim() );
      });

      query.containedIn('url', entries);
      query.find()
        .done(function (results) {
          var COUNT_CONTAINER_REF = '.leancloud-visitors-count';

          if (results.length === 0) {
            $visitors.find(COUNT_CONTAINER_REF).text(0);
            return;
          }

          for (var i = 0; i < results.length; i++) {
            var item = results[i];
            var url = item.get('url');
            var time = item.get('time');
            var element = document.getElementById(url);

            $(element).find(COUNT_CONTAINER_REF).text(time);
          }
        })
        .fail(function (object, error) {
          console.log("Error: " + error.code + " " + error.message);
        });
    }

    function addCount(Counter) {
      var $visitors = $(".leancloud_visitors");
      var url = $visitors.attr('id').trim();
      var title = $visitors.attr('data-flag-title').trim();
      var query = new AV.Query(Counter);

      query.equalTo("url", url);
      query.find({
        success: function(results) {
          if (results.length > 0) {
            var counter = results[0];
            counter.fetchWhenSave(true);
            counter.increment("time");
            counter.save(null, {
              success: function(counter) {
                var $element = $(document.getElementById(url));
                $element.find('.leancloud-visitors-count').text(counter.get('time'));
              },
              error: function(counter, error) {
                console.log('Failed to save Visitor num, with error message: ' + error.message);
              }
            });
          } else {
            var newcounter = new Counter();
            newcounter.set("title", title);
            newcounter.set("url", url);
            newcounter.set("time", 1);
            newcounter.save(null, {
              success: function(newcounter) {
                var $element = $(document.getElementById(url));
                $element.find('.leancloud-visitors-count').text(newcounter.get('time'));
              },
              error: function(newcounter, error) {
                console.log('Failed to create');
              }
            });
          }
        },
        error: function(error) {
          console.log('Error:' + error.code + " " + error.message);
        }
      });
    }

    $(function() {
      var Counter = AV.Object.extend("Counter");
      if ($('.leancloud_visitors').length == 1) {
        addCount(Counter);
      } else if ($('.post-title-link').length > 1) {
        showTime(Counter);
      }
    });
  </script>



 
</body>
</html>
